package lc_LCP_61_气温变化趋势;

public class Solution {

    public int temperatureTrend(int[] temperatureA, int[] temperatureB) {
        int ans = 0;
        for (int i = 1, l = 0; i < temperatureA.length; i++) {
            int a = temperatureA[i], b = temperatureB[i];
            int c = temperatureA[i - 1], d = temperatureB[i - 1];
            if (a > c && b > d || a < c && b < d || a == c && b == d) {
                ans = Math.max(ans, i - l);
            } else {
                l = i;





















































                
            }
        }
        return ans;
    }
}